/*
 * Copyright 2006-2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.martinimix.service.payment.provider;

import net.martinimix.domain.order.Order;
import net.martinimix.domain.payment.BillMeLaterAccount;
import net.martinimix.domain.payment.BillMeLaterAccountAuthorization;

/**
 * Provides a Bill Me Later payment processor.  Bill Me Later payment 
 * processors accept authorization requests and handle the details
 * associated with Bill Me Later account sign-up.
 * 
 * @author Scott Rossillo
 *
 */
public interface BillMeLaterProcessor {
	
	/**
	 * Authorizes the given Bill Me Later account as payment for the given order.
	 * The given account will be authorized and signed up for Bill Me Later 
	 * payment services if this transaction results in a successful authorization.
	 *  
	 * @param billMeLaterAccount the <code>BillMeLaterAccount</code> to authorize
	 * @param order the <cod>Order</code> for which <code>billMeLaterAccount</code>
	 * will be authorized for payment
	 * 
	 * @return a <code>BillMeLaterAccountAuthorization</code> containing the results
	 * of this authorization and sign-up request
	 */
	public BillMeLaterAccountAuthorization authorizePayment(BillMeLaterAccount billMeLaterAccount, Order order);

	/**
	 * Returns the Bill Me Later PayCapture Lite web service URL.
	 *  
	 * @return the Bill Me Later PayCapture Lite web service URL
	 */
	public String getPayCaptureLiteUrl();
}
